#ifndef RTSPMEDIAPLAYER_H
#define RTSPMEDIAPLAYER_H
#include <QMediaPlayer>
#include <QVideoProbe>
#include <QAudioProbe>

class RtspMediaPlayer : public QObject
{
    Q_OBJECT
public:
    RtspMediaPlayer(QObject *parent = NULL);
    Q_INVOKABLE void play();
    Q_INVOKABLE void setVideoSurface(QAbstractVideoSurface *surface);

public slots:
    void processVideoFrame(const QVideoFrame &videoFrame);
    void processAudioBuffer(const QAudioBuffer &audioBuffer);

private:
    QMediaPlayer *mediaPlayer;
    QVideoProbe *videoProbe;
    QAudioProbe *audioProbe;
};

#endif // RTSPMEDIAPLAYER_H
